/**
 *
 * @author Smile.Wu
 * @version 2015-5-14
 */
public class TestTimeCost {

	public static void main(String[] args) {
		int total = 4000;
		long count = 0;
		for(int i = 0; i < total; i ++) {
			for(int j = i + 1; j < total; j ++) {
				count ++;
			}
		}
		
		System.out.println(count);
	}
}
